#pragma once

#include <QtGui>
#include <QtCore>
#include <QGraphicsObject>

class wqBtnItem : public QGraphicsObject
{
	Q_OBJECT

public:
	wqBtnItem(const QString& name, QGraphicsItem* parent = 0);

	void setHoverFlag(bool bhov);

protected:
	virtual QRectF boundingRect() const;
	virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* item, QWidget* wid);

	virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event );
	virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );

private:
	QRadialGradient GetGreen_linearGradient(int OFFSET_Y = 0);
	QRadialGradient GetYellow_linearGradient(int OFFSET_Y = 0);

private:
	bool mbHover;
};
